/*
 * global_auth.h
 *
 *  Created on: Aug 27, 2010
 *      Author: ofer
 */

#ifndef GLOBAL_AUTH_H_
#define GLOBAL_AUTH_H_

#include "misc.h"

BasicHashFunctionPtr which_hash(char* str);
bool check_Hash_name(char* s);
int hash_Length(char* str);
void get_hexadecimal_hashed_password(char* word, BasicHashFunctionPtr hash, char* dest);
void get_hash_name_from_file(FILE* f, char* dest);
void get_salty_hexadecimal_hashed_password(char* word, unsigned char* salt, BasicHashFunctionPtr hash, int hash_length, char* dest);
char* get_word_num_ptr(char* input, int index, char delimiter);
void get_word_num(char* input, int index, char* dest, char delimiter);
int get_word_length(char* input, char delimiter);
int count_words_in_line(char* line, char delimiter);
int get_value(char* key, FILE* f, char* dest, char delimiter);
bool check_file(char* file_name);
bool check_file_exist(char* file_name);
int validate_hex_string(char* line);
bool check_deht_files_exists(char* name);


#endif /* GLOBAL_AUTH_H_ */
